﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace comdiinfo
{
    public class G64Version : G64Element<byte>
    {
        public G64Version(int trackNo)
            : base(trackNo)
        {
            elementName = "G64 Version";
        }
        public override void LoadData(ref G64ImageData imgData, int srcOffset, int count)
        {
            ElementValue = imgData.readBytes(8, 1, elementName)[0];
        }
        public override void CheckValue()
        {
            if (ElementValue == 0)
            {
                elementStatus = G64ElementStatus.Ok;
            }
            else
            {
                elementStatus = G64ElementStatus.Warning;
                elementStatusText.AppendFormat("{0} {1} ({2})", elementName, "sollte 0 sein!", ElementValue.ToString());
                elementStatusText.AppendLine();
            }
        }
    }
}
